import 'package:wanxiang_app/generated/json/base/json_field.dart';
import 'package:wanxiang_app/generated/json/banner_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class BannerEntity {
	late int code;
	late String msg;
	late List<BannerData> data;

	BannerEntity();

	factory BannerEntity.fromJson(Map<String, dynamic> json) => $BannerEntityFromJson(json);

	Map<String, dynamic> toJson() => $BannerEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class BannerData {
	late String name;
	late String url;

	BannerData();

	factory BannerData.fromJson(Map<String, dynamic> json) => $BannerDataFromJson(json);

	Map<String, dynamic> toJson() => $BannerDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}